riscv: hang on unhandled exceptions
authorLukas Auer <[email protected]>
Thu, 22 Nov 2018 10:26:22 +0000 (11:26 +0100)
committerAndes <[email protected]>
Mon, 26 Nov 2018 05:57:30 +0000 (13:57 +0800)
Hang on unhandled exceptions to prevent execution in a faulty state.

Signed-off-by: Lukas Auer <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Rick Chen <[email protected]>
arch/riscv/lib/interrupts.c

index d0d8de500ee65e31a32a61ad7638f4bc2d47348d..903a1c4cd55766f7383b6c3eb93fff67c72ef652 100644 (file)
@@ -87,4 +87,6 @@ static void _exit_trap(ulong code, ulong epc, struct pt_regs *regs)
        } else {
                printf("Reserved\n");
        }
+
+       hang();
 }